package com.common.sdk.net.download.http;

import com.common.sdk.net.connect.http.DefaultRetryPolicy;

/**
 * 重载联网请求时间，读取时间，网络请求错误联网次数，下载的网络连接超时时间及需要联网次数
 * @author wenlonglv
 *
 */
public class DownloadRetryPolicy extends DefaultRetryPolicy {

    /** The socket current timeout in milliseconds */
    public static final int DOWNLOAD_CURRENT_TIMEOUT_MS = 25000;

    /** The socket read timeout in milliseconds */
    public static final int DOWNLOAD_READ_TIMEOUT_MS = 0;

    /** The number of retries */
    public static final int DOWNLOAD_READ_MAX_RETRIES = 2;

    /** The backoff multiplier */
    public static final float DOWNLOAD_BACKOFF_MULT = 1f;

    public DownloadRetryPolicy() {
        this(DOWNLOAD_CURRENT_TIMEOUT_MS, DOWNLOAD_READ_TIMEOUT_MS, DOWNLOAD_READ_MAX_RETRIES, DOWNLOAD_BACKOFF_MULT);
    }

    public DownloadRetryPolicy(int initialCurrentTimeoutMs, int initialReadTimeoutMs, int maxNumRetries,
            float backoffMultiplier) {
        super(initialCurrentTimeoutMs, initialReadTimeoutMs, maxNumRetries, backoffMultiplier);
    }

}
